package com.yunhe.portal.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunhe.common.annotation.NameTitle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName DataNewsInfoVo
 * @Description TODO
 * @Author HeTao
 * @Date 2021/10/19 11:02
 * @Version 1.0
 **/
@Data
@ApiModel("新闻列表出参对象")
public class DataNewsInfoVo implements Serializable {
    private static final long serialVersionUID = -6987157030406619356L;

    @ApiModelProperty("新闻id")
    private Long id;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("副标题")
    private String subtitle;

    @ApiModelProperty("是否禁用")
    private String activity;

    @ApiModelProperty("是否禁用Title")
    @NameTitle(nameCode = "activity",nameType = "ITEM")
    private String activityTitle;

    @ApiModelProperty("展示图片")
    private String photo;

    @ApiModelProperty("发布人")
    private Long  publishPerson;

    @ApiModelProperty("内容")
    private String content;

    @ApiModelProperty("发布人名称")
    @NameTitle(nameCode = "publishPerson",nameType = "USER")
    private String  publishPersonName;

    @ApiModelProperty("发布时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date publishTime;

    @ApiModelProperty("发布状态")
    private String status;

    @ApiModelProperty("发布状态")
    @NameTitle(nameCode = "publishStatus",nameType = "ITEM")
    private String statusTitle;
}
